package com.csun.cmny.provider.device.csun.sleep.entity;

import com.csun.cmny.provider.model.enums.device.DeviceStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-04-15 20:01
 * @Description: real sleep message
 */
@Data
public class MsgSleepReal {

    // 消息类型
    private String msgType = "realSleepMsg";

    /**
     * 设备Id
     */
    private Long deviceId;

    /**
     * 设备编号
     */
    private String deviceNo;

    /**
     * 状态, offline-离线，online-在线
     */
    private String status = DeviceStatusEnum.OFFLINE.getKey();

    /**
     * 是否在床 0-不在床 1-在床
     */
    private Integer inBed = 0;

    /**
     * 心跳
     */
    private Integer heartbeat = 0;

    /**
     * 呼吸
     */
    private Integer breath = 0;

    /**
     * 是否需要翻身 0-未翻身 需要提示, 1-已翻身 无提示
     */
    private Integer action = 1;

    /**
     * 体动时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date actionTime = null;

}
